<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图像</title>
</head>
<body>

<img id="scream" src="img/eg_flower.png" width="224" height="162" alt="The Scream">

<canvas id="myCanvas" width="244" height="182" style="border:1px solid #d3d3d3;">
  Your browser does not support the HTML5 canvas tag.
</canvas>

<script>
  window.onload = function(){
    var canvas = document.getElementById("myCanvas");
    var ctx = canvas.getContext("2d");
    var img = document.getElementById("scream");
    ctx.drawImage(img,10,10);
  }
</script>

</body>
</html>